ScanDocument Offset

Gets or sets the offset vector to be applied to the ScanDocument. The complete ScanDocument will be offset from the origin using the defined values.

public OffsetVector Offset {get;set}

 

Return value

OffsetVector Offset Vector to be applied

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    CircleShape circleShape = new CircleShape();
    circleShape.CenterPoint.X = 0.0f;
    circleShape.CenterPoint.Y = 0.0f;
    circleShape.CenterPoint.Z = 0.0f;
    circleShape.Clockwise = true;
    circleShape.Radius = 10;
    circleShape.StartAngle = 0;
    circleShape.MaximumSegmentationError = 0.001f;

    vectorImage.AddCircle(circleShape);

    SpiralShape spiral = new SpiralShape();
    spiral.CenterPoint = new Point3D(0, 0, 0);
    spiral.InnerRadius = 0.2f;
    spiral.OuterRadius = 8;
    spiral.Angle = 0.3f; 
    spiral.Pitch = 0.1f;

    vectorImage.AddSpiral(spiral,0.1f);

    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "StartLogging(\"192.168.137.1\", 5032)\r\n ScanAll()"));

    // offset the whole job 
    OffsetVector offset = new OffsetVector(1, 1, 0);
    scanDocument.Offset = offset;

    try
    {
        scanDocument.StartScanning();
    }
    catch
    {

    }

}